<div class="zs-body" data-ng-init="formInit('gzdeviceborrow', {
        keyField:'id',
        randomFields:['id'],
        orderObject:{id:0}
    }) && loadData('gzdeviceborrow');setConHei();">
    <div class="zs-map-tool">
        <div class="location">
            <a href="javascript:;">首页</a>
            <i class="right-arr"></i>
            <a href="javascript:;">固定资产</a>
            <i class="right-arr"></i>
            <a href="javascript:;">设备使用</a>
        </div>
        <div class="option">
            <input type="button" class="zs-btn orange" value="新建" 
                ng-click="addRow('gzdeviceborrow') && openWindow('edit');"/>
            <input type="button" class="zs-btn orange" value="编辑" 
                ng-click="editRow('gzdeviceborrow', gzdeviceborrow.sRows[0]) && openWindow('edit')"/>
            <input type="button" class="zs-btn orange" value="删除 "
                ng-click="delEntitys('gzdeviceborrow')"/>
        </div>
    </div>
    <div class="zs-content" style="position:unset">
        <div class="zs-nice-tab idTabs">
			<div class="tool item" style="margin-left:6px;">
            	<!--<span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" class="zs-input" placeholder="ID" ng-model="gzdeviceborrow.queryObject['id']"/>
                </span>
            	<span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" class="zs-input" placeholder="I_VERSION" ng-model="gzdeviceborrow.queryObject['iversion']"/>
                </span>-->
            	<span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" class="zs-input" placeholder="申请编号" ng-model="gzdeviceborrow.queryObject['ssqbh']"/>
                </span>
			
            	<span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" class="zs-input" placeholder="使用单位" ng-model="gzdeviceborrow.queryObject['ssydw']"/>
                </span>
            	<span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" class="zs-input" placeholder="使用项目" ng-model="gzdeviceborrow.queryObject['ssyxm']"/>
               </span>
            </div>
            <div class="operation item" style="margin-top:7px;">
                <input type="button" class="zs-btn orange" value="查询" 
                    ng-click="loadData('gzdeviceborrow')"/>
            </div>
        </div>
        <div class="date-container">
            <div id="zpgwd">
                <div class="zs-data-table">
                    <div class="container">
                        <table>
                            <thead>
                                <tr>
                                    <th>
                                        <input id="allCheckbox" type="checkbox"
                                            ng-click="selectAll('gzdeviceborrow','allCheckbox');" />
                                    </th>
									<!--<th>ID</th>
									<th>I_VERSION</th>-->
									<th>申请编号</th>
									<th>申请日期</th>
									<th>使用单位</th>
									<th>使用项目</th>
									<th>申请人</th>
									<th>预还日期</th>
									<th>归还日期</th>
									<th>归还人</th>
									<th>备注</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="r in gzdeviceborrow.datas">
                                    <td>
                                        <input type="checkbox"
                                            ng-click="selectRow('gzdeviceborrow',r);"
                                            ng-model="r.selected" />
                                    </td>
									<!--  ID -->
            						<!--<td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.id"></label>
                                        </a>
                                   </td>-->
									<!--  I_VERSION -->
            						<!--<td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.iversion"></label>
                                        </a>
                                   </td>-->
									<!--  申请编号 -->
            						<td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.ssqbh"></label>
                                        </a>
                                   </td>
									<!--  申请日期 -->
								   <td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.dsqrq | asDate | date:'yyyy-MM-dd'"></label>
                                        </a>
                                   </td>
									<!--  使用单位 -->
            						<td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.ssydwName"></label>
                                        </a>
                                   </td>
									<!--  使用项目 -->
            						<td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.ssyxm"></label>
                                        </a>
                                   </td>
									<!--  申请人 -->
            						<td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.ssqr"></label>
                                        </a>
                                   </td>
									<!--  预还日期 -->
								   <td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.dyhrq | asDate | date:'yyyy-MM-dd'"></label>
                                        </a>
                                   </td>
									<!--  归还日期 -->
								   <td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.dghrq | asDate | date:'yyyy-MM-dd'"></label>
                                        </a>
                                   </td>
									<!--  归还人 -->
            						<td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.sghr"></label>
                                        </a>
                                   </td>
									<!--  备注 -->
            						<td>
                                        <a ng-click="editRow('gzdeviceborrow',r) && openWindow('edit');">
                                            <label ng-bind="r.sbz"></label>
                                        </a>
                                   </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="zs-pagination-box">
                    <ag-Page fn='gzdeviceborrow'></ag-Page>
                </div>
            </div>
        </div>

        <div ag-Window id="edit" title="设备借还编辑" width='560px' height='286px'>
            <div class="zs-form-tab ibox">
                <form name="form" novalidate>
                    <table width="100%">
                        <tbody>
          					<!--<tr>
                                <td class="text" width="20%">ID</td>
                                <td class="left" width="30%">
                                	<input type="text" ng-model="gzdeviceborrow.editRow.id" class="zs-input" />
                                </td>
                            </tr>
          					<tr>
                                <td class="text" width="20%">I_VERSION</td>
                                <td class="left" width="30%">
                                	<input type="text" ng-model="gzdeviceborrow.editRow.iversion" class="zs-input" />
                                </td>
                            </tr>-->
          					<tr>
                                <td class="text" width="20%"><font color="red">*</font>设备编号</td>
                                <td class="left" width="30%">
                                	<input type="text" ng-model="gzdeviceborrow.editRow.ssqbh" class="zs-input" readonly="true"/>
                                	
                                	 <span ng-show="false"><input hide-novalidate="true" 
                                		alias="设备编号" required 
                                		ng-model="gzdeviceborrow.editRow.ssqbh"
                                		name="form_ssqbh"/></span>
                                		
                                </td>

                                <td class="text" width="20%"><font color="red">*</font>申请日期</td>
                                <td class="left" width="30%"><span>
                                	<ag-Datebox id='fi_dsqrq'  showcurday='gzdeviceborrow.editRow.FIELD_ISNEW'
		                        		class="zs-input" style="width:175px;height: 28px"
		                        		ng-model="gzdeviceborrow.editRow.dsqrq" >
							   		</ag-Datebox></span>
							   		
							   		 <span ng-show="false"><input hide-novalidate="true" 
                                		alias="申请日期" required 
                                		ng-model="gzdeviceborrow.editRow.dsqrq"
                                		name="form_dsqrq"/></span>
                                </td>
                            </tr>
                            <tr>
                                <td class="left" width="50%" colspan="4" style="padding-left:40px">
                                	<input type="button" name="ok" value="选择设备" class="zs-btn c-green" 
                                        ng-click="openWindow('chooseDevice');" />
                                </td>
                            </tr>
          					<tr>
                                <td class="text" width="20%"><font color="red">*</font>使用单位</td>
                                <td class="left" width="30%">
                                	<!--<input type="text" ng-model="gzdeviceborrow.editRow.ssydw" class="zs-input" />-->
                                	<ag-Combotree class="zs-input" style="width:175px;height: 28px" 
											fn='dptidEdit'
											para="{ uDictionary:true,
													dictionary:'p_department',
													pidField:'pid',
		                    						leafField:'leaf'}"
											ng-model="gzdeviceborrow.editRow.ssydw"
											text-Value="gzdeviceborrow.editRow.ssydwName"/>
											
											
											 <span ng-show="false"><input hide-novalidate="true" 
                                		alias="使用单位" required 
                                		ng-model="gzdeviceborrow.editRow.ssydw"
                                		name="form_ssydw"/></span>
                                </td>
                           
                                <td class="text" width="20%"><font color="red">*</font>使用项目</td>
                                <td class="left" width="30%">
                                	<input type="text" ng-model="gzdeviceborrow.editRow.ssyxm" class="zs-input" />
                                	
                                	 <span ng-show="false"><input hide-novalidate="true" 
                                		alias="使用项目" required 
                                		ng-model="gzdeviceborrow.editRow.ssyxm"
                                		name="form_ssyxm"/></span>
                                </td>
                            </tr>
          					<tr>
                                <td class="text" width="20%"><font color="red">*</font>申请人</td>
                                <td class="left" width="30%">
                                	<input type="text" ng-model="gzdeviceborrow.editRow.ssqr" class="zs-input" />
                                	<span ng-show="false"><input hide-novalidate="true" 
                                		alias="申请人" required 
                                		ng-model="gzdeviceborrow.editRow.ssqr"
                                		name="form_ssqr"/></span>
                                </td>
                            
                                <td class="text" width="20%"><font color="red">*</font>预还日期</td>
                                <td class="left" width="30%">
                                	<span>
                                	<ag-Datebox id='fi_dyhrq'  showcurday='gzdeviceborrow.editRow.FIELD_ISNEW'
		                        		class="zs-input" style="width:175px;height: 28px"
		                        		ng-model="gzdeviceborrow.editRow.dyhrq" >
							   		</ag-Datebox></span>
							   		
							   			<span ng-show="false"><input hide-novalidate="true" 
                                		alias="预还日期" required 
                                		ng-model="gzdeviceborrow.editRow.dyhrq"
                                		name="form_dyhrq"/></span>
                                </td>
                            </tr>
						   <tr>
                                <td class="text" width="20%">归还日期</td>
                                <td class="left" width="30%">
                                	<ag-Datebox id='fi_dghrq'  showcurday='gzdeviceborrow.editRow.FIELD_ISNEW'
		                        		class="zs-input" style="width:175px;height: 28px"
		                        		ng-model="gzdeviceborrow.editRow.dghrq" >
							   		</ag-Datebox>
                                </td>
                           
                                <td class="text" width="20%">归还人</td>
                                <td class="left" width="30%">
                                	<input type="text" ng-model="gzdeviceborrow.editRow.sghr" class="zs-input" />
                                </td>
                            </tr>
          					<tr>
                                <td class="text" width="20%">备注</td>
                                <td class="left" width="30%" colspan="3">
                                	<input type="text" ng-model="gzdeviceborrow.editRow.sbz" class="zs-input" />
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="4">
                                    <input type="button" name="ok" value="保存" class="zs-btn c-red"
                                        ng-click="formValidate(form) && save('gzdeviceborrow', gzdeviceborrow.editRow, saveCloseWindow)"/>
                                    <input type="button" name="ok" value="取消" class="zs-btn c-green" 
                                        ng-click="closeWindow('edit')" />
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </form>
            </div>
        </div>
        <div ag-Window id="chooseDevice" title="选择设备" width='560px' height='360px'>
		    <div class="zs-form-tab ibox"
		    	data-ng-init="formInit('gzdevice', {
			        keyField:'id',
			        randomFields:['id'],
			        orderObject:{id:0},
			        queryObject:{'szt':'clzt_wsy'}
			    }) && loadData('gzdevice');setConHei();">
		        <div class="zs-nice-tab idTabs">
					<div class="tool item" style="margin-left:6px;">
		            	<span class="search-warpper">
	                    <i class="icon"></i>
	                    <input type="text" class="zs-input" placeholder="设备编号" ng-model="gzdevice.queryObject['ssbbh']" />
	                </span>
	                <span class="search-warpper">
	                    <i class="icon"></i>
	                    <input type="text" class="zs-input" placeholder="设备名称" ng-model="gzdevice.queryObject['ssbmc']" />
	                </span>
		            </div>
		            <div class="operation item" style="margin-top:7px;">
		            	<input type="button" class="zs-btn orange" value="查询" 
		            		ng-click="loadData('gzdevice')"/>
		                <!--<a class="ope-1" ng-click="loadData('gzdevice')"></a>
		                <a class="ope-2"></a>-->
		            </div>
		            <div class="switch">
		                
		            </div>
		        </div>
		        <div class="date-container">
		            <div id="zpgwd">
		                <div class="zs-data-table">
		                    <div class="container">
		                        <table>
		                            <thead>
		                                <tr>
		                                	<th></th>
											<th>设备名称</th>
											<th>型号</th>
											<th>是否涉密设备</th>
		                                </tr>
		                            </thead>
		                            <tbody>
		                                <tr ng-repeat="r in gzdevice.datas">
		                                	<td>
		                                        <input type="checkbox"
		                                            ng-click="selectRow('gzdevice',r,true);"
		                                            ng-model="r.selected" />
		                                    </td>
		            						<td>
		                                        <a >
		                                            <label ng-bind="r.ssbmc"></label>
		                                        </a>
		                                   </td>
		            						<td>
		                                        <a >
		                                            <label ng-bind="r.sxh"></label>
		                                        </a>
		                                   </td>
		            						<td>
		                                        <a >
		                                            <label ng-bind="r.isfsmsbName"></label>
		                                        </a>
		                                   </td>
		                                </tr>
		                            </tbody>
		                            <tfoot>
			                            <tr>
			                                <td colspan="4">
			                                    <input type="button" class="zs-btn orange" value="选择" 
                									ng-click="chooseDevice(gzdeviceborrow.editRow,gzdevice.sRows[0],'chooseDevice');"/>
			                                </td>
			                            </tr>
			                        </tfoot>
		                        </table>
		                    </div>
		                </div>
		                <div class="zs-pagination-box">
		                    <ag-Page fn='gzdevice'></ag-Page>
		                </div>
		            </div>
		        </div>
		    </div>
		</div>
    </div>
</div>